package com.doyens.controller;

import com.doyens.common.R;
import com.doyens.entity.Level;
import com.doyens.service.LevelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "招生老师级别查询接口")
@RequestMapping("/level")
public class LevelController {

    @Autowired
    private LevelService levelService;

    @GetMapping("/list")
    @ApiOperation(value = "添加招生老师选择级别列表展示下拉框")
    public R<List<Level>> nameList(){
        List<Level> list = levelService.list();
        return R.success(list);
    }
}
